package com.easy.dao;

import com.easy.bean.Category;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CategoryDao {
    int add(@Param("category") Category category);
    int delete(@Param("id")int cateid);
    int edit(@Param("category")Category category);
    Category getById(@Param("id")int cateid);
    List<Category> getList(@Param("page")Page page,@Param("text") String text);
    List<Category> getChildren(@Param("id")int parentid);
    List<Category> getParent(@Param("id")int cateid);
    int getCount(@Param("text")String text);

    List<Category> chart1();
    List<Category> chart2();
}
